import request from '@/plugins/axios'

export function rentPropertyPage(query){
    return request({
        url: '/api/rentproperty/page',
        method: 'get',
        params: query
    })
}

export function rentPropertyAdd(data){
    return request({
        url: '/api/rentproperty',
        method: 'post',
        data: data
    })
}

export function rentPropertyEdit(data){
    return request({
        url: '/api/rentproperty',
        method: 'put',
        data: data
    })
}

export function getRentProperty(id){
    return request({
        url: '/api/rentproperty/' + id,
        method: 'get'
    })
}

export function rentPropertyDelete(id){
    return request({
        url: '/api/rentproperty/delete',
        method: 'post',
        data: id
    })
}

export function rentPropertyRoomDelete(id){
    return request({
        url: '/api/rentproperty/deleteRoom',
        method: 'post',
        data: id
    })
}

export function getRentPropertyRoom(id){
    return request({
        url: '/api/rentproperty/getRentProperty/' + id,
        method: 'get'
    })
}

export function updateBusiness(data){
    return request({
        url: '/api/rentproperty/updateBusiness',
        method: 'put',
        data: data
    })
}

export function getLoadTree(id){
    return request({
        url: '/api/rentproperty/loadTree/' + id,
        method: 'get'
    })
}

export function validateRoomName(query){
    return request({
        url: '/api/roominfo/validateRoomName',
        method: 'get',
        params: query
    })
}

export function validateProject(query){
    return request({
        url: '/api/rentproperty/validateProject',
        method: 'get',
        params: query
    })
}

export function getReloadProperty(id){
    return request({
        url: '/api/rentproperty/reloadProperty/' + id,
        method: 'get'
    })
}
